import {
  BrowserRouter, Route, Routes
} from "react-router-dom";
import Auth from './Auth';
import Home from "./views/Home";
import Login from './views/Login';
import NotFound from "./views/NotFound";
import DemoPage2 from "./views/Demos/editableTable"
import HopetoLayout from './views/Layout';

function App() {
  return (
    <BrowserRouter>
      <Auth>
        <Routes>
          <Route path="/">
            <Route index element={<Login />} />
            <Route path="login" element={<Login />} />
            <Route path="demo" element={<DemoPage2 />} />
            <Route path="app" element={<HopetoLayout />}>
              <Route index element={<Home />} />
              <Route path="home" element={<Home />} />
              <Route path="*" element={<NotFound />} />
            </Route>
          </Route>
        </Routes>
      </Auth>
    </BrowserRouter>
  )
}

export default App
